using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GenerationWrap:MonoBehaviour, IGenerationComponent {


	private void Start() {
		OnGeneration();
	}

	public void OnGeneration() {
		for(int i = 0;i<transform.childCount;i++) {
			Transform t = transform.GetChild(i);
			t.parent=transform.parent;
			t.GetComponent<IGenerationComponent>()?.OnGeneration();
		}
		Destroy(gameObject);

	}
}
